<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        /* 
            给一个盒子设置背景图：
                1）盒子大  图片小   平铺 
                2）盒子小  图片大 
        */
        .box{
            width: 54px;
            height: 54px;
            border: 1px solid #000;

            /* background-color: red; */

            /* 默认情况下，大图的左上角和盒子padding的左上角对齐 */
            background-image: url(./images/spirite.png);

            background-position: 0 -413px;
        }
        .box2{
            width: 154px;
            height: 38px;
            border: 1px solid #000;
            background-image: url(./images/spirite.png);
            background-position: -186px -172px;
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="box2"></div>
</body>
</html>